<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSysAccountsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_accounts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('platform')->default('0')->comment('平台');
            $table->integer('type')->default('0')->comment('类型');
            $table->string('name')->default('')->comment('名称');
            $table->text('description')->comment('描述');
            $table->integer('logoid')->comment('图标ID');
            $table->string('appid')->default('')->comment('Appid');
            $table->string('appsecret')->default('')->comment('AppSecret');
            $table->string('access_token')->default('')->comment('Access Token');
            $table->dateTime('expire_time')->comment('过期时间');
            $table->integer('order')->default('0')->comment('排序');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_accounts');
    }
}
